﻿using System.Threading.Tasks;
using SKIT.FlurlHttpClient.Wechat.Api;

namespace Colorful.Furniture.MiniProgram;

/// <summary>
///  微信小程序扩展
/// </summary>
public interface IWechatMiniProgramExtensions
{
    /// <summary>
    ///  获取令牌
    /// </summary>
    /// <returns></returns>
    Task<string> GetAccessTokenAsync();

    /// <summary>
    ///  客户端
    /// </summary>
    WechatApiClient Client { get; set; }

    /// <summary>
    ///  获取令牌
    /// </summary>
    /// <param name="appId"></param>
    /// <param name="appSecret"></param>
    /// <returns></returns>
    Task<string> GetAccessTokenAsync(string appId, string appSecret);

    /// <summary>
    ///  微信JSON结果
    /// </summary>
    /// <param name="wxJsonResult"></param>
    void HandleWxJsonResult<T>(T wxJsonResult);
}